﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace App.Core.DataConfig
{
    public interface IEntity<TPrimaryKey>
    {
        TPrimaryKey Id { get; set; }
    }
    public abstract class Entity<TKey> : IEntity<TKey>
    {
        [Key]
        public virtual TKey Id { get; set; }
    }
    public abstract class AuditEntity<TKey> : IEntity<TKey>
    {
        [Key]
        public virtual TKey Id { get; set; }

        public long? CreatorUserId { get; set; }

        public long? DeletedUserId { get; set; }

        public DateTime? CreationTime { get; set; }

        public DateTime? LastModifyTime { get; set; }
    }
}
